//-----------------------------------------------------------------------
#include <iostream>
//-----------------------------------------------------------------------
#include "Singleton.h"
//-----------------------------------------------------------------------
void main()
{
	std::cout << "Design Patterns - Clase 1: Singleton" << std::endl;
	std::cout << "Ejemplo de uso de clase singleton:" << std::endl << std::endl;

	//Singleton s;
	//Singleton* s = new Singleton();

	Singleton* s1 = Singleton::getInstance();
	s1->addNumber(5);

	std::cout << "El numero de s1 es: " << s1->getNumber() << std::endl;
	
	Singleton* s2 = Singleton::getInstance();
	s2->addNumber(6);

	std::cout << "El numero de s2 es: " << s2->getNumber() << std::endl;

	std::cout << "El numero de s1 despues de modificar s2 es: " << s1->getNumber() << std::endl;

}
//-----------------------------------------------------------------------
